<html>
<head>
 <title>Script to send mail</title>
 </head>
 <body>
<?php
echo "<p>Thank you, <b>$_POST[name]</b>, Your message has been sent.</p>";
//start building the mail string
 $msg = "Name; $_POST[name] ";
 $msg .= "E-Mail: $_POST[email] ";
 $msg .= "Message: $_POST[message] ";
 $recipient = "you@yourdomain.com";
 $subject = "Form Submission Results";
 $mailheaders = "From: My Website <you@yourdomain.com> ";
 $mailheaders .= "Reply-to: $_POST[email]";
 //send the mail
 mail($recipient, $subject, $msg, $mailheaders);
 ?>
 </body>
 </html>

